import request from '@/utils/request'

// 获取咨询信息列表(带分页)
export function getConsultList (data) {
    return request({
        url: '/api/crm/consult',
        method: 'GET',
        data
    })
}

// 添加咨询信息
export function createConsult (data) {
    return request({
        url: '/api/crm/consult',
        method: 'POST',
        data
    })
}

// 获取咨询信息
export function getConsultInfo (id) {
    return request({
        url: `/api/crm/consult/${id}`,
        method: 'GET'
    })
}

// 修改咨询信息
export function updateConsult (data) {
    return request({
        url: `/api/crm/consult/${data.id}`,
        method: 'PUT',
        data
    })
}

// 删除咨询信息
export function delConsult (id) {
    return request({
        url: `/api/crm/consult/${id}`,
        method: 'DELETE'
    })
}
